@extends('layouts.main')

@section('title', '编辑项目类型')

@section('content')
<h3>@yield('title')</h3>
<div class="btn-group" role="group">
  <a href="{{ action('BaseData\ProjectTypeController@index') }}" class="btn btn-primary">返回列表</a>
</div>

<form class="form-horizontal" method="post" action="{{ action('BaseData\ProjectTypeController@update', $model) }}">
    @csrf
    @method('PUT')
    <div class="form-group">
      <label for="type" class="col-sm-2 control-label">项目类型代码</label>
      <div class="col-sm-3">
        <input class="form-control" id="type" name="type" placeholder="请输入项目类型代码" value="{{ old('type', $model->type) }}">
        @if($errors->first('type'))
        <p class="help-block error">{{ $errors->first('type') }}</p>
        @endif
      </div>
    </div>

    <div class="form-group">
      <label for="type_desc" class="col-sm-2 control-label">项目类型描述</label>
      <div class="col-sm-3">
        <input class="form-control" id="type_desc" name="type_desc" placeholder="请输入项目类型描述" value="{{ old('type_desc', $model->type_desc) }}">
        @if($errors->first('type_desc'))
        <p class="help-block error">{{ $errors->first('type_desc') }}</p>
        @endif
      </div>
    </div>

    <div class="form-group">
      <div class="col-sm-offset-2 col-sm-10">
        <button type="submit" class="btn btn-primary">提交</button>
      </div>
    </div>
  </form>

@endsection